package cn.shujuhai.cms.service;

import cn.shujuhai.cms.domain.Recipient;
import cn.shujuhai.common.pluging.data.ResultVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author niuyahu
 * @description 针对表【recipient】的数据库操作Service
 * @createDate 2024-12-25 14:58:58
 */
public interface RecipientService extends IService<Recipient> {

    ResultVo<PageInfo<Recipient>> getRecipientPageInfo(String email, Integer page, Integer pageSize, Long groupId);

    ResultVo<?> add(Recipient recipient);

    ResultVo<Recipient> edit(Recipient recipient);

    ResultVo<Recipient> removeId(Integer id);

    MPJLambdaWrapper<Recipient> getRecipientListByGroupId(Long groupId);

    ResultVo<?> importRecipients(MultipartFile file, Integer id) throws IOException;

    void downloadTemplate(HttpServletResponse response);

    ResultVo<?> recipientListByGroupId(Long groupId);

}
